package de.fmaul.dicheck.model;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class DataSet implements Iterable<DataTable> {

    private final List<DataTable> tables = new ArrayList<DataTable>();

    public void addTable(final DataTable dt) {
        tables.add(dt);
    }

    public DataTable getFirstTable() {
        return tables.get(0);
    }

    public boolean isDataAvailable() {
        for (final DataTable t : tables) {
            if (t.isDataAvailable()) {
                return true;
            }
        }
        return false;
    }

    public DataSet() {
        // TODO Auto-generated constructor stub
    }

    public Iterator<DataTable> iterator() {
        return tables.iterator();
    }

    public List<DataTable> getTables() {
        return tables;
    }
}
